package com.seraphine.demo1.controller;

import com.seraphine.api.microservice.demo2.facads.Demo2ApiService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述: 测试接口
 * 作者: panhongtong
 * 创建时间: 2020-11-05 09:05
 **/
@Api(tags = "测试接口")
@RestController
public class Demo1Controller {

    @Autowired
    private Demo2ApiService demo2ApiService;

    @GetMapping("anonymous/demo1")
    public String demo1() {
        return "<h1>HelloWord</h1>";
    }

    @GetMapping("anonymous/demo1to2")
    public String demo1to2() {
        return demo2ApiService.demo2();
    }

    @GetMapping("testAuth")
    public String testAuth() {
        return "success!-访问成功";
    }

}
